#!/usr/bin/env bash

# 检查是否已安装docker
docker -v


! test -d conf  &&   echo "请切换到 mysql-slave 目录"  && exit 1

echo -e "\033[31m正在停止容器... \033[0m"
./docker-compose -f ./docker-compose.yml stop
echo -e "\033[31m正在删除容器... \033[0m"
./docker-compose -f ./docker-compose.yml rm -f

echo -e "\033[31m正在删除./data目录... \033[0m"
rm -rvf ./data
echo -e "\033[31m删除成功... \033[0m"